<?php
session_start();
isLogin();
if(isset($_POST['Submits'])){
	if(mysql_query("update ".$prefix."ad set art_index_ad1='".addslashes($_POST['art_index_ad1'])."',art_index_ad2='".addslashes($_POST['art_index_ad2'])."',art_index_ad3='".addslashes($_POST['art_index_ad3'])."',art_index_ad4='".addslashes($_POST['art_index_ad4'])."',art_index_ad5='".addslashes($_POST['art_index_ad5'])."',art_list_ad1='".addslashes($_POST['art_list_ad1'])."',art_list_ad2='".addslashes($_POST['art_list_ad2'])."',art_list_ad3='".addslashes($_POST['art_list_ad3'])."',art_list_ad4='".addslashes($_POST['art_list_ad4'])."',art_view_ad1='".addslashes($_POST['art_view_ad1'])."',art_view_ad2='".addslashes($_POST['art_view_ad2'])."',art_view_ad3='".addslashes($_POST['art_view_ad3'])."',art_view_ad4='".addslashes($_POST['art_view_ad4'])."',art_view_ad5='".addslashes($_POST['art_view_ad5'])."',art_view_ad6='".addslashes($_POST['art_view_ad6'])."' where a_id=1")){
		reload_js("修改成功","index.php?cmd=artad");
	}else{
		reload_js("修改失败，原因：程序错误，请联系技术人员进行修改","index.php");
	}
}
?>
<script type="text/javascript" src="../model/fckeditor/fckeditor.js"></script>
<script language="javascript" src="../templates/<?php echo $moban;?>/js/common.js"></script>
<script language="javascript">
changeWebTitle('广告管理');
</script>

<div class="ContentRight">
    <div class="ContentRightTop">
      <div class="BarLeft"></div>
      <div class="ContentRightTopText">广告管理</div>
      <div class="BarRight"></div>
      <div class="Cal"></div>
    </div>
    <div class="ContentRightBox">
	<form name="adform" method="post" action="">
    <div id="tab" style="margin:10px;">
    <a href="javascript:;" onClick="changeVisible(['art_list','art_view'],'art_index');">文章首页</a> | <a href="javascript:;" onClick="changeVisible(['art_index','art_view'],'art_list');">文章列表页</a> | <a href="javascript:;" onClick="changeVisible(['art_index','art_list'],'art_view');">文章内容页</a>
    </div>
      <table width="100%" cellpadding="0" class="Table1" bordercolor="#4ab902" border="1" cellspacing="0" id="art_index">
        <tr>
          <td align="center" colspan="2" height="25px;"><a href="http://www.fengsh8.com/help/faq236.html" target="_blank">文章系统广告位位置一览</a></td>
		</tr>
        <tr>
          <td align="right" valign="top" style="padding-top:5px;">文章首页广告一：</td>
          <td>
		<script type="text/javascript">
			var sBasePath = '../model/fckeditor/' ;
			 
			var oFCKeditor = new FCKeditor( 'art_index_ad1' ) ;
			oFCKeditor.BasePath	= sBasePath ;
			oFCKeditor.Height	= 180 ;
			oFCKeditor.Width	= 580 ;
			oFCKeditor.ToolbarSet="Fengsh";
			oFCKeditor.Value	= "<?php echo str_replace('"','\"',preg_replace('/\r\n/','',$ads['art_index_ad1']));?>";
			oFCKeditor.Create() ;
		</script>		  </td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">文章首页广告二：</td>
          <td width="91%">
		<script type="text/javascript">
			var sBasePath = '../model/fckeditor/' ;
			 
			var oFCKeditor = new FCKeditor( 'art_index_ad2' ) ;
			oFCKeditor.BasePath	= sBasePath ;
			oFCKeditor.Height	= 180 ;
			oFCKeditor.Width	= 580 ;
			oFCKeditor.ToolbarSet="Fengsh";
			oFCKeditor.Value	= "<?php echo str_replace('"','\"',preg_replace('/\r\n/','',$ads['art_index_ad2']));?>";
			oFCKeditor.Create() ;
		</script>		</td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">文章首页广告三：</td>
          <td width="91%">
		<script type="text/javascript">
			var sBasePath = '../model/fckeditor/' ;
			 
			var oFCKeditor = new FCKeditor( 'art_index_ad3' ) ;
			oFCKeditor.BasePath	= sBasePath ;
			oFCKeditor.Height	= 180 ;
			oFCKeditor.Width	= 580 ;
			oFCKeditor.ToolbarSet="Fengsh";
			oFCKeditor.Value	= "<?php echo str_replace('"','\"',preg_replace('/\r\n/','',$ads['art_index_ad3']));?>";
			oFCKeditor.Create() ;
		</script>		</td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">文章首页广告四：</td>
          <td width="91%">
          <textarea name="art_index_ad4" cols="70" rows="5"><?php echo $ads['art_index_ad4'];?></textarea>
		  </td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">文章首页广告五：</td>
          <td width="91%">
          <textarea name="art_index_ad5" cols="70" rows="5"><?php echo $ads['art_index_ad5'];?></textarea>
		  </td>
        </tr>
        
        <tr>
          <td height="25" align="right">版权所有：</td>
          <td><a href="http://www.fengsh8.com" target="_blank">风尚淘客程序</a></td>
        </tr>
        <tr>
          <td height="25" align="right">&nbsp;</td>
          <td>
            <input name="Submits" type="submit" id="Submits" value=" 提  交" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            <input name="Reset" type="reset" id="Reset" value=" 重 置 " />          </td>
        </tr>
      </table>
      <table width="100%" cellpadding="0" class="Table1" bordercolor="#4ab902" border="1" cellspacing="0" id="art_list" style="display:none">
        <tr>
          <td align="center" colspan="2" height="25px;"><a href="http://www.fengsh8.com/help/faq236.html" target="_blank">文章系统广告位位置一览</a></td>
		</tr>
        <tr>
          <td align="right" valign="top" style="padding-top:5px;">列表页广告一：</td>
          <td>
		<script type="text/javascript">
			var sBasePath = '../model/fckeditor/' ;
			 
			var oFCKeditor = new FCKeditor( 'art_list_ad1' ) ;
			oFCKeditor.BasePath	= sBasePath ;
			oFCKeditor.Height	= 180 ;
			oFCKeditor.Width	= 580 ;
			oFCKeditor.ToolbarSet="Fengsh";
			oFCKeditor.Value	= "<?php echo str_replace('"','\"',preg_replace('/\r\n/','',$ads['art_list_ad1']));?>";
			oFCKeditor.Create() ;
		</script>		  </td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">列表页广告二：</td>
          <td width="91%">
		<script type="text/javascript">
			var sBasePath = '../model/fckeditor/' ;
			 
			var oFCKeditor = new FCKeditor( 'art_list_ad2' ) ;
			oFCKeditor.BasePath	= sBasePath ;
			oFCKeditor.Height	= 180 ;
			oFCKeditor.Width	= 580 ;
			oFCKeditor.ToolbarSet="Fengsh";
			oFCKeditor.Value	= "<?php echo str_replace('"','\"',preg_replace('/\r\n/','',$ads['art_list_ad2']));?>";
			oFCKeditor.Create() ;
		</script>		</td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">列表页广告四：</td>
          <td width="91%">
          <textarea name="art_list_ad3" cols="70" rows="5"><?php echo $ads['art_list_ad3'];?></textarea>
		  </td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">列表页广告三：</td>
          <td width="91%">
		<script type="text/javascript">
			var sBasePath = '../model/fckeditor/' ;
			 
			var oFCKeditor = new FCKeditor( 'art_list_ad4' ) ;
			oFCKeditor.BasePath	= sBasePath ;
			oFCKeditor.Height	= 180 ;
			oFCKeditor.Width	= 580 ;
			oFCKeditor.ToolbarSet="Fengsh";
			oFCKeditor.Value	= "<?php echo str_replace('"','\"',preg_replace('/\r\n/','',$ads['art_list_ad4']));?>";
			oFCKeditor.Create() ;
		</script>		</td>
        </tr>
        <tr>
          <td height="25" align="right">版权所有：</td>
          <td><a href="http://www.fengsh8.com" target="_blank">风尚淘客程序</a></td>
        </tr>
        <tr>
          <td height="25" align="right">&nbsp;</td>
          <td>
            <input name="Submits" type="submit" value=" 提  交" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            <input name="Reset" type="reset" id="Reset" value=" 重 置 " />          </td>
        </tr>
      </table>
      <table width="100%" cellpadding="0" class="Table1" bordercolor="#4ab902" border="1" cellspacing="0" id="art_view" style="display:none">
        <tr>
          <td align="center" colspan="2" height="25px;"><a href="http://www.fengsh8.com/help/faq236.html" target="_blank">文章系统广告位位置一览</a></td>
		</tr>
        <tr>
          <td align="right" valign="top" style="padding-top:5px;">内容页广告一：</td>
          <td>
		<script type="text/javascript">
			var sBasePath = '../model/fckeditor/' ;
			 
			var oFCKeditor = new FCKeditor( 'art_view_ad1' ) ;
			oFCKeditor.BasePath	= sBasePath ;
			oFCKeditor.Height	= 180 ;
			oFCKeditor.Width	= 580 ;
			oFCKeditor.ToolbarSet="Fengsh";
			oFCKeditor.Value	= "<?php echo str_replace('"','\"',preg_replace('/\r\n/','',$ads['art_view_ad1']));?>";
			oFCKeditor.Create() ;
		</script>		  </td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">内容页广告二：</td>
          <td width="91%">
          <textarea name="art_view_ad2" cols="70" rows="5"><?php echo $ads['art_view_ad2'];?></textarea>
		  </td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">内容页广告三：</td>
          <td width="91%">
          <textarea name="art_view_ad3" cols="70" rows="5"><?php echo $ads['art_view_ad3'];?></textarea>
		 </td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">内容页广告四：</td>
          <td width="91%">
		<script type="text/javascript">
			var sBasePath = '../model/fckeditor/' ;
			 
			var oFCKeditor = new FCKeditor( 'art_view_ad4' ) ;
			oFCKeditor.BasePath	= sBasePath ;
			oFCKeditor.Height	= 180 ;
			oFCKeditor.Width	= 580 ;
			oFCKeditor.ToolbarSet="Fengsh";
			oFCKeditor.Value	= "<?php echo str_replace('"','\"',preg_replace('/\r\n/','',$ads['art_view_ad4']));?>";
			oFCKeditor.Create() ;
		</script>		</td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">内容页广告五：</td>
          <td width="91%">
          <textarea name="art_view_ad5" cols="70" rows="5"><?php echo $ads['art_view_ad5'];?></textarea>
		  </td>
        </tr>
        <tr>
          <td width="9%" align="right" valign="top" style="padding-top:5px;">内容页广告六：</td>
          <td width="91%">
          <textarea name="art_view_ad6" cols="70" rows="5"><?php echo $ads['art_view_ad6'];?></textarea>
		 </td>
        </tr>
        <tr>
          <td height="25" align="right">版权所有：</td>
          <td><a href="http://www.fengsh8.com" target="_blank">风尚淘客程序</a></td>
        </tr>
        <tr>
          <td height="25" align="right">&nbsp;</td>
          <td>
            <input name="Submits" type="submit" id="Submits" value=" 提  交" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            <input name="Reset" type="reset" id="Reset" value=" 重 置 " />          </td>
        </tr>
      </table>
	  </form>
    </div>
    <div class="Cal"></div>
  </div>